package com.xcity.game.activity.gift;

import com.xcity.game.item.ItemTemplate;

import naga.x.App;
import naga.x.game.template.Template;
import naga.x.game.template.TemplateException;
import naga.x.game.template.TemplateService;
import naga.x.game.template.annotation.Binding;
import naga.x.game.template.annotation.Excel;

/**
 * 礼包兑换
 * @author yang.li
 *
 */
@Excel(value = "activity.xlsx", sheet = 2)
@Deprecated
public class GiftExchangeTemplate extends Template {

	/** 物品id */
	protected int itemId;

	/** 物品数量 */
	protected int itemCount;
	
	protected ItemTemplate ref;

	public int getItemId() {
		return itemId;
	}

	public void setItemId(int itemId) {
		this.itemId = itemId;
	}

	public int getItemCount() {
		return itemCount;
	}

	public void setItemCount(int itemCount) {
		this.itemCount = itemCount;
	}

	public ItemTemplate getRef() {
		return ref != null ? ref : (ref = App.getApp().getServiceManager().get(TemplateService.class).get(ItemTemplate.class, itemId));
	}

	@Override
	public void validate() throws TemplateException {}
}
